{% extends "blog/base.html" %}

{% block title %}Share a post{% endblock title %}

{% block content %}
	{% if sent %}
		<h1>E-mail successfully sent</h1>
		<p>
			"{{ post.title }}" was successfully to {{ cd.to }}.
		</p>
	{% else %}
		<h1>Share "{{ post.title }}" by e-mail</h1>
		<form action="{% url 'blog:post_share' post.id %}" method="post">
			{% csrf_token %}
			{{ form.as_p }}
			<input type="submit" value="send e-mail">
			}
		</form>
	{% endif %}
{% endblock content %}